home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * PROGRAM: Image.prg
- *
- * WRITTEN BY: Borland Late Night Crew
- *
- * DATE: 5/93
- *
- * UPDATED: 7/16/93
- *
- * VERSION: Alpha α
- *
- * DESCRIPTION: Image.prg shows Bladerunner's image and graph window controls,
- * and how these and other controls can work together to reflect
- * the current state of the open database.
- * A pie graph object is defined, with each slice of the graph
- * showing the GNP of a European country. An image object is
- * defined below that, highlighting the country of choice
- * highlighted on a map of Europe. Double-clicking on a slice of
- * the European pie moves the record pointer to the corresponding
- * country, and updates the map image. Two entryfields are also
- * defined showing the current country's name and capitol. The
- * END pushbutton closes the window.
- *
- * PARAMETERS: None
- *
- * CALLS: None
- *
- * USAGE: DO Image
- *
- *
- *
- *******************************************************************************
- #define IROW 12 && starting point for defining the map image
- #define ICOL 3
-
- private savearea
- savearea = str(workarea())
-
- *** fonts
- define font ArialB height 20 width 25 type "Arial" Bold
- define font ModernBI height 15 width 10 type "Modern" Bold Italic
- define font TimesNewRomanB height 20 width 12 type "Courier" Bold
- define font Modern height 14 width 6 type "Arial"
-
- use country in select()
- select country
-
- define window Country of desktop from 1, 1 to 28,75;
- title "European GNP";
- color b/bg;
- sizeable;
- onclose Cleanup()
-
- * Graph object defined on a file created using GRAPH FORM.
- * This is a pie graph of the GNP of European countries.
- define graph pieGraph of Country from 2,27 to 17,70 filename eurpie.grf
- define text messageText of Country at 17,30;
- prompt "Double click on a pie slice to change the country.";
- font Modern;
- color bg/b
- define image mapImage of Country from IROW,ICOL to IROW+15 ,ICOL+26 memo map
- define entryfield country->Name of Country at 7,ICOL;
- font TimesNewRomanB;
- color rb/bg
- define entryfield country->Capital of Country at 9,ICOL;
- font ModernBI;
- color b/bg
- define pushbutton end of Country at IROW +8,ICOL+41 prompt "End";
- font TimesNewRomanB;
- color b/bg
-
- on selection window Country close window Country
-
- readmodal("country")
- Cleanup()
-
- ***************************************************************************
- function Cleanup
- ***************************************************************************
- use
- select &savearea
- return .t.
-
- ******************************** End of Image.prg *****************************
-